<template>
  <div>
    <div v-for="(item, index) in list" :key="index">
      <div class="bg-white m-10">
        <div class="flex a-center p-10 p-v-20 b-r-4">
          <!-- <img class="w-40 h-40 b-round" :src="logo" alt /> -->
          <div class="flex-1 m-l-10">
            <div class="flex j-between">
              <router-link
                tag="div"
                :to="`/goods/merchant/${item.bid}`"
                class="overflow-one m-r-20 fw-500 fs-rem-14px text-content"
              >
                <p class="flex a-center">
                  <span>{{item.bname}}</span>
                  <van-icon class="m-l-5" name="arrow" />
                </p>
              </router-link>
              <!-- 1 已下单 2交易完成 3已评价 4已取消 -->
              <router-link :to="`/user/order/detail/${item.id}`" class="flex-s-0">
                <span v-if="item.status === 1" class="text-grey fs-rem-12px">已下单</span>
                <span v-else-if="item.status === 2" class="text-grey fs-rem-12px">交易完成</span>
                <span v-else-if="item.status === 3" class="text-grey fs-rem-12px">已评价</span>
                <span v-else-if="item.status === 4" class="text-grey fs-rem-12px">已取消</span>
              </router-link>
            </div>
          </div>
        </div>
        <div class="b-t p-10">
          <router-link
            :to="`/user/order/detail/${item.id}`"
            class="fs-rem-14px text-content flex j-between a-center p-l-20 p-v-10"
          >
            <div class="flex a-center">
              <img class="w-30 h-30 b-round" :src="item.picture" alt="logo" />
              <span class="overflow-one text-grey m-l-10">{{item.gname}}</span>
            </div>
            <p class="text-title min-w-50 text-right">{{item.zk / 10}}折</p>
          </router-link>
          <p class="flex j-end p-t-10 p-t-5" v-if="item.status === 2">
            <van-button
              size="small"
              round
              type="danger"
              :to="{path: `/user/order/evaluate/${item.ddh}`, query: {pic: item.picture}}"
              plain
            >评价商家</van-button>
          </p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    list: {
      type: Array
    }
  }
}
</script>
